package com.my.hzb.order.mq;

import javax.jms.*;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

public class MqReceiver {

	private static final Logger log = LogManager.getLogger(MqReceiver.class);
	
	public void onMessage(Message message) {
        TextMessage textMessage = (TextMessage) message;
        try {
        	log.info("order接受的消息："+textMessage.getText());
        	System.out.println(textMessage.getText());
        }catch(Exception e){
        	e.printStackTrace();
        }
	}
}
